/*
 * 
 *    Copyright (C) 2012 Freddy Barrera All Rights Reserved.
 *   
 *    This program is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU General Public License
 *    as published by the Free Software Foundation; either version 2
 *    of the License, or Mozilla Public License any later version.
 *   
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *   
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software
 *    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *  
 *    Redistribution and use in source and binary forms, with or without
 *    modification, are permitted provided that the following conditions are met:
 *   
 *    -Redistribution of source code must retain the above copyright notice, this
 *     list of conditions and the following disclaimer.
 *   
 *    -Redistribution in binary form must reproduce the above copyright notice,
 *     this list of conditions and the following disclaimer in the documentation
 *     and/or other materials provided with the distribution.
 *   
 *    Neither the name of Freddy Barrera or the names of contributors may
 *    be used to endorse or promote products derived from this software without
 *    specific prior written permission.
 *   
 *    This software is provided "AS IS," without a warranty of any kind. ALL
 *    EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
 *    ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
 *    OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. Freddy Barrera
 *    AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 *    AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
 *    DERIVATIVES. IN NO EVENT WILL Freddy Barrera OR ITS LICENSORS BE LIABLE FOR ANY LOST
 *    REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
 *    INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
 *    OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
 *    EVEN IF Freddy HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *   
 *    You acknowledge that this software is not designed, licensed or intended
 *    for use in the design, construction, operation or maintenance of any
 *    nuclear facility.
 *  
 * 
 */
package mx.uacam.ermilo.ercu.util;

/**
 * The basics operations interface describes the methods required to perform 
 * basic CRUD functions in a GUI and also defines a method to update the table.
 * 
 * @author Freddy Barrera
 */
public interface BasicsOperations extends ActionCommand{

    /**
     * Add a new element to the system.
     */
    void add();

    /**
     * Edit an element of the system.
     */
    void edit();

    /**
     * Delete an element of the system.
     */
    void delete();

    /**
     * Find an item in the system.
     * @param field That part took the form of information.
     */
    void find(int field);    

    /**
     * Test if any of the fields on the form is empty.
     * If any field is empty returns true otherwise false.
     * 
     * @param field That part took the form of information.
     * @return 
     */
    boolean isEmptyFields(int field);

    /**
     * Clean the fields indicated.
     * @param fields clean form fields.
     */
    void cleanFields(int fields);

    /**
     * Updates the table.
     */
    void updateTable();
}